#include <bits/stdc++.h>
using namespace std;

int main(int argc, char const *argv[])
{
    int l,r;
    cin >> l >> r;
    int ans = 0;
    for(int i = l;i<=r;i++){
        if(i % 2 != 0){
            ans++;
        }else if(i % 4 == 0){
            ans++;
        }
    }
    cout << ans;
    return 0;
}
